<?php
/**
 * Data model
 *
 * @category  DataModel
 * @package   DataModel
 * @author    DataModel Generator v1.0
 * @version   $Revision: 127 $
 */
/**
 * Data model for table "pfile"
 *
 * @category  DataModel
 * @package   DataModel
 * @author    DataModel Generator v1.0
 * @version   $Revision: 127 $
 */
/*
class Phpclass extends BasePhpclass
{
    public function findByWords(array $words)
    {
        $q = ORMQuery::selectBuilder()
            ->from('Phpclass pc');
        foreach($words as $word) {
            $word = trim($word);
			$q ->orWhere('pc.name LIKE ?','%' . $word . '%');
			$q ->orWhere('pc.extends LIKE ?','%' . $word . '%');
			$q ->orWhere('pc.implements LIKE ?','%' . $word . '%');
        }
        return $q->fetchAll('Phpclass');
    }
    
    public function getTags()
    {
        $q = ORMQuery::selectBuilder()
            ->select('dt.*')
            ->from('Docgrouptags dt')
            ->andWhere( 'dt.group_id= ?', $this->group_id );
        //print $this->id.' | '.$q; exit;
        $dtags = $q->fetchAll('Docgrouptags');
        $res = array();
        foreach($dtags as $dtag) {
            if($dtag->name == 'author' || $dtag->name == 'todo') {
                if(!array_key_exists($dtag->name,$res)) {
                    $res[$dtag->name] = array();
                }
                $res[$dtag->name][] = $dtag->value;            
            } else {
                $res[$dtag->name] = $dtag->value;
            }
        }
        //print_r($res); exit;
        return $res;
    }
    

    public static function saveIfNotExists($params = null)
    {
        return parent::saveIfNotExists($params, __CLASS__);
    }
}
*/